package com.cino.demos.mapper.shortlink;

import com.cino.demos.entity.shortlink.Link;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface ShortLinkMapper {
    Link selectById(Integer id);

    String selectByFullUrl(String fullShortUrl);

    @Insert("insert into shortlink (domain,short_url,full_short_url,origin_url) values " +
            "(#{domain},#{shortUrl},#{fullShortUrl},#{originUrl})")
    int insert(Link link);
}
